package com.luck.rabbit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 延时消息监听
 * Created by Hua wb on 2018/12/11.
 */
/*@Component
@EnableRabbit
@Configuration
@RabbitListener(queues = RabbitConfig.QUEUE_DLX)*/
public class RabbitListeningDelay {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @RabbitHandler
    public void process(String content) {
        logger.info("延时消息：" + content);
    }

}

